package com.ossean.match.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.ossean.match.model.Atom;


public interface AtomicItemDao {
	@Insert("insert into atomic_items(name,num_in_tags,num_in_projects) values(#{name},#{numInTags},#{numInPrj})")
	public Integer insertAtomicItem(@Param("name")String name,@Param("numInTags")int numInTags,@Param("numInPrj")int numInPrj);
	
	@Update("update atomic_items set num_in_tags = #{numInTags}, num_in_projects = #{numInPrj} where name = #{name}")
	public Integer updateAtomicItem(@Param("name") String name, @Param("numInTags")int numInTags,@Param("numInPrj")int numInPrj);
	
	@Select("select * from atomic_items")
	public List<Atom> selectAllAtom();
}
